package com.zm.zb100.test;

import java.io.Serializable;

/**
 * Result
 *
 * <p>
 * </p>
 *
 * @author chuanbai
 * @date 2024/3/31
 */
public class Result<T> implements Serializable {

    private static final long serialVersionUID = -7894540986403115525L;

    private T result;

    private String message;
    private boolean dataOnly;

    public Result() {
    }

    public Result(T result) {
        this.result = result;
    }

    public T getResult() {
        return result;
    }

    public Result<T> setResult(T result) {
        this.result = result;
        return this;
    }

    public Result setMessage(String message) {
        this.message = message;
        return this;
    }

    public boolean isDataOnly() {
        return dataOnly;
    }

    public Result<T> setDataOnly(boolean dataOnly) {
        this.dataOnly = dataOnly;
        return this;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "Result{" +
                "result=" + result +
                ", message='" + message + '\'' +
                ", dataOnly=" + dataOnly +
                '}';
    }
}
